package com.wehealth;

import java.util.List;

import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.util.Log;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ListView;

public class SelectDepartDialog extends Dialog{

	private ListView depart_list;
    private Context context;
    private OnItemClickListener onItemClickListener;
    private String[] departs;

	public SelectDepartDialog(Context context,int theme,OnItemClickListener onItemClickListener,String[] departs) {
		super(context,theme);
		// TODO Auto-generated constructor stub
		this.context = context;
		this.onItemClickListener = onItemClickListener;
		this.departs = departs;
		
	}

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.select_depart_dialog);
		depart_list =(ListView)findViewById(R.id.depart_list);
		DepartAdapter adapter = new DepartAdapter(context, departs);
		depart_list.setAdapter(adapter);
		depart_list.setOnItemClickListener(onItemClickListener);
	}
	
	
	
	

}
